#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>

char* getmemory()
{
	char* p = (char*)malloc(10 * sizeof(int));
	return p;
}

int main()
{
	char* p = NULL;
	p = getmemory();
	if (p == NULL)
	{
		perror("malloc");
		return 1;
	}
	strcpy(p, "hello word");
	printf(p);
	free(p);
	p = NULL;
	return 0;
}